package com.longnuoqi.mydoctor.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Lenovo on 2016/1/12.
 */
public class User implements Parcelable{
    private int id;
    private String account;    //       登录帐号
    private String email;    //       邮箱
    private String avatar;    //       头像地址
    private String home;    //      个人主页
    private String phone;    //       联系电话 手机，电话等
    private String qq;    //      QQ号
    private String weibo;    //       微博名称
    private int gender;    //      性别，1：男 0：女
    private long birth;    //      出生年月
    private String province;    //       省份
    private String city;    //      城市
    private String signature;   //个性签名
    private int isemail;    //      是否显示邮箱 1：显示 0：不显示
    private int isphone;    //     是否显示联系电话 1：显示 0：不显示
    private int role;    //     用户权限，0：普通用户，1：管理员；-1:未激活；-2：黑名单
    private String qqid;//    QQ ID
    private long weiboid;    //      微博ID
    private long time;    //注册日期

    public User() {
    }

    protected User(Parcel in) {
        id = in.readInt();
        account = in.readString();
        email = in.readString();
        avatar = in.readString();
        home = in.readString();
        phone = in.readString();
        qq = in.readString();
        weibo = in.readString();
        gender = in.readInt();
        birth = in.readLong();
        province = in.readString();
        city = in.readString();
        signature = in.readString();
        isemail = in.readInt();
        isphone = in.readInt();
        role = in.readInt();
        qqid = in.readString();
        weiboid = in.readLong();
        time = in.readLong();
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        @Override
        public User createFromParcel(Parcel in) {
            return new User(in);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getHome() {
        return home;
    }

    public void setHome(String home) {
        this.home = home;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getWeibo() {
        return weibo;
    }

    public void setWeibo(String weibo) {
        this.weibo = weibo;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public long getBirth() {
        return birth;
    }

    public void setBirth(long birth) {
        this.birth = birth;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public int getIsemail() {
        return isemail;
    }

    public void setIsemail(int isemail) {
        this.isemail = isemail;
    }

    public int getIsphone() {
        return isphone;
    }

    public void setIsphone(int isphone) {
        this.isphone = isphone;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public String getQqid() {
        return qqid;
    }

    public void setQqid(String qqid) {
        this.qqid = qqid;
    }

    public long getWeiboid() {
        return weiboid;
    }

    public void setWeiboid(long weiboid) {
        this.weiboid = weiboid;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(account);
        dest.writeString(email);
        dest.writeString(avatar);
        dest.writeString(home);
        dest.writeString(phone);
        dest.writeString(qq);
        dest.writeString(weibo);
        dest.writeInt(gender);
        dest.writeLong(birth);
        dest.writeString(province);
        dest.writeString(city);
        dest.writeString(signature);
        dest.writeInt(isemail);
        dest.writeInt(isphone);
        dest.writeInt(role);
        dest.writeString(qqid);
        dest.writeLong(weiboid);
        dest.writeLong(time);
    }
}
